Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

The self-update functionality used http.Get() without timeouts, causing potential indefinite hangs on slow or unresponsive GitHub API calls.

Changes

  • Created http.Client with 30-second timeout in internal/updater/self_update.go
  • Applied timeout to both GitHub API requests: release metadata fetch and binary download
// Before
resp, err := http.Get("https://api.github.com/repos/" + repo + "/releases/latest")

// After
client := &http.Client{
    Timeout: 30 * time.Second,
}
resp, err := client.Get("https://api.github.com/repos/" + repo + "/releases/latest")

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ite hangs

Co-authored-by: ops295 <42335697+ops295@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP address feedback on self-update command Add HTTP client timeout to prevent indefinite hangs in self-update Jan 7, 2026
Copilot AI requested a review from ops295 January 7, 2026 02:27
@ops295 ops295 closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants